package com.example.ch05memoryuserdetails.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * @description:
 * @author:ScorpioWang
 * @date:2021-11-02-09-11
 */
public class MySecurityConfig extends WebSecurityConfigurerAdapter {
    @Autowired
    private UserDetailsService detailsService;

    public MySecurityConfig() {
    }

    protected void configure(HttpSecurity http) throws Exception {
        http.userDetailsService(this.detailsService);
    }
}